package com.lanqiao.testwork;

import java.util.Scanner;

public class Test26 {

	public static void main(String[] args) {
		test();
	}

	/**
	 * 输入字母判断星期几,第一个相同则输入第二个
	 */
	private static void test() {
		Scanner sc = new Scanner(System.in);
		char c1 = sc.nextLine().charAt(0);
		switch (c1) {
		case 'M':
		case 'm':
			System.out.println("星期一");
			break;
		case 'W':
		case 'w':
			System.out.println("星期三");
			break;
		case 'F':
		case 'f':
			System.out.println("星期五");
			break;
		case 'T':
		case 't':
			char c2 = sc.nextLine().charAt(0);
			if(c2 == 'u' || c2 == 'U') {
				System.out.println("星期二");
				break;			}
			if(c2 == 'h' || c2 == 'H') {
				System.out.println("星期四");
				break;
			}
		case 'S':
		case 's':
			char c3 = sc.nextLine().charAt(0);
			if(c3 == 'u' || c3 == 'U') {
				System.out.println("星期日");
				break;			}
			if(c3 == 'a' || c3 == 'A') {
				System.out.println("星期六");
				break;
			}
		}
	}

}
